import request from '@/utils/request'
// 新增资讯类别
export function addArticleCatalog(data) {
	return request({
		url: '/admin/article/catalog',
		method: 'post',
		data,
		showLoading: true
	})
}
// 资讯类别分页
export function pagingArticleCatalog(data) {
	return request({
		url: '/admin/article/catalog/paging',
		method: 'post',
		data,
		showLoading: true
	})
}
// 资讯类别列表
export function listArticleCatalog(data) {
	return request({
		url: '/admin/article/catalog/list',
		method: 'post',
		data,
		showLoading: true
	})
}
// 资讯类别详情
export function getArticleCatalogDetail(id) {
	return request({
		url: '/admin/article/catalog/' + id,
		method: 'get',
		showLoading: true
	})
}
// 修改资讯类别
export function editArticleCatalog(data) {
	return request({
		url: '/admin/article/catalog',
		method: 'put',
		data,
		showLoading: true
	})
}
// 批量删除资讯类别
export function delArticleCatalog(idList) {
	return request({
		url: '/admin/article/catalog/' + idList,
		method: 'delete',
		showLoading: true
	})
}
// 上下架
export function publishArticleCatalog(data) {
	return request({
		url: '/admin/article/catalog/publish',
		method: 'put',
		data,
		showLoading: true
	})
}
